package gaml.testing;

import gaml.core.GamlConfig;
import gaml.error.GamlException;
import gaml.text.YamlText;
import gaml.text.printer.ScalarNodePrinter;
import gaml.yaml.ScalarNode;
import gaml.yaml.ahchor.YamlAnchor;

import org.junit.Test;


public class ScalarNodePrinterTest {

	@Test
	public void testPrint () throws GamlException {
		ScalarNode node = new ScalarNode (null);
		node.setAnchor (new YamlAnchor ("anch1", node));
		node.setValue ("scalar1");
		node.setComment ("scalar comment");
		
		YamlText text = new YamlText ();
		new ScalarNodePrinter (GamlConfig.getDefault ()).print (node, text);
		System.out.println (text.getText ());
	}
}
